<template>
	<view>
		<uni-drawer ref="showRight" mode="right" :width="windowWidth">
		<scanBar></scanBar>
		</uni-drawer>
	</view>
</template>

<script>
	import scanBar from'@/pages/unit/scanBarCode.vue'
	export default {
		name:"scanBarCode",
		components:{
			scanBar
		},
		data() {
			return {
				windowWidth: 0
			};
		},
		onLoad() {
			//获取屏幕高度
			uni.getSystemInfo({
				success: (res) => {
					this.windowWidth = res.windowWidth;
				}
			})
		},
		methods:{
			//打开控件窗体
			open() {
				this.$nextTick(() => {
					this.$refs.showRight.open()
				})
			},
			//关闭控件窗体
			close() {
				this.$refs.showRight.close()
			}
		}
	}
</script>

<style>

</style>